package com.mew.chess.core.game.qmcs.game.message.request;

import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;


@Data
@ToString
@NoArgsConstructor
public class QmcsHitRequestMessage extends ZebraBaseMessage<QmcsHitRequestMessage> {

    private int seatId; //位ID
    private int bulletId; //子弹ID
    private int betId; //押注ID
    private int qmcsId; //鱼ID
    private long remainStep;


    @Override
    public void write(ByteBuf b) {

        writeInt(b, this.seatId);
        writeInt(b, this.bulletId);
        writeInt(b, this.betId);
        writeInt(b, this.qmcsId);

    }

    @Override
    public QmcsHitRequestMessage read(ByteBuf b) {
        QmcsHitRequestMessage message = new QmcsHitRequestMessage();
        message.seatId = readInt(b);
        message.bulletId = readInt(b);
        message.betId = readInt(b);
        message.qmcsId = readInt(b);
        message.remainStep = readLong(b);
        return message;
    }

}
